package com.lds.memory.kafka.partition.reject;

import com.lds.memory.kafka.enums.ErrorEnum;
import com.lds.memory.kafka.exception.PartitionEnqueueException;

public class ThrowExceptionRejectedStrategy implements RejectedStrategy {
    @Override
    public <T> void rejected(T data) {
        throw new PartitionEnqueueException(ErrorEnum.PARTITION_ENQUEUE_EXCEPTION.getErrorMessage(), data);
    }
}
